#ifndef TEST_FOR_SINGLY_LINKED_LIST_H
#define TEST_FOR_SINGLY_LINKED_LIST_H

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "memory_dump.h"

typedef struct node
{
    int data; //数据域
    struct node* next; //指针域
}Node;

typedef int SLData;
typedef struct SList
{
    SLData a;//数据域
    struct SList* next;//指针域
}SList;

struct ListNode
{
    int val;
    struct ListNode *next;
};

void test_for_singly_linked_list(void);
struct ListNode* create_node(unsigned int node_val);
void head_insert(struct ListNode** head_node, unsigned int node_val);
void tail_insert(struct ListNode** head_node, unsigned int node_val);
void print_node(struct ListNode* node);
struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2);
struct ListNode* test_case_create(char* src);
struct ListNode* mergeTwoLists(struct ListNode* list1, struct ListNode* list2);
void destroy_node(struct ListNode** phead);
void head_delete(struct ListNode** phead);
void tail_delete(struct ListNode** phead);
void stick_node(struct ListNode** phead, unsigned int pos_add, unsigned int node_val);
void delete_node(struct ListNode** phead, unsigned pos_del);
void revise_node(struct ListNode** phead, unsigned int pos, unsigned int node_val);

#endif